<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<style>
	.form-item {
		margin: 20px 10px;
	}
	
	.form-item>label {
		letter-spacing: 3px;
		width: 110px;
		text-align: right;
		display: inline-block;
	}
	
	.form-item>label:AFTER {
		content: ":";
	}
	
	.form-item input[type=text] {
		width: 100px;
	}
	
	.form-item.required>label:BEFORE {
		content: "*";
		color: red;
	}
</style>
<form id="tuikuanForm">
<br/>
	<h3 style="text-align: center;">退款记录</h3>
	<div class="form-item required">
	<input type="hidden" name="tuikuanid" value="${tuikuanEntity.tuikuanId }"/>
		<label for="">学生班级</label>
		<select data-options="editable:false" name="className" style="padding: 3px;height:24px;border-radius: 5px;border-color: dodgerblue;"onchange="move(this.value)">
					<option value="">请选择</option>
					<c:forEach items="${classList }" var="list">
						<option value="${list.classId }" ${list.classId==classEntity.classId?'selected':'' }>${list.className }</option>
					</c:forEach>
		</select>
		<label for="">学生姓名</label>
		<select id="student" data-options="editable:false" name="studentName" style="padding: 3px;height:24px;border-radius: 5px;border-color: dodgerblue;">
					<option value="">请选择</option>
					<c:forEach items="${studentList }" var="list">
						<option value="${list.stuId }" ${list.stuId==studentEntity.stuId?'selected':'' }>${list.studentName }</option>
					</c:forEach>
		</select>
		<input type="hidden" name="studentid" value="${tuikuanEntity.studentinfoId.stuId}"/> 
		&nbsp;&nbsp;&nbsp; 
	</div>
	<div class="form-item required">
		<label for="">退款金额</label>
		<input value="${tuikuanEntity.tuikuanMoney}" type="text" data-options="required:true" class="easyui-textbox" name="tuikuanMoney">
		<label style="margin-left: 20px;" for="">退款时间</label>
		<input value="${tuikuanEntity.tuikuanTime}" type="text" data-options="required:true" class="easyui-datetimebox" name="tuikuantime">
	
		</div>
	<div class="form-item required">
		<label for="">退款原因</label><br>
	<textarea rows="5%" cols="30%" style="margin-left: 116px;"  data-options="required:true" name="tuikuanReason">
		${tuikuanEntity.tuikuanReason}
		</textarea>
	</div>
</form>
<script>
	function move(obj) {
		var id=obj;
		var optionString = "";
		 $.get("caiwu/teamcontent/" + id, function(rs) {
				if (rs.success) {
					var data=rs.message;
					for (var i = 0; i < data.length; i++) {
							 optionString +="<option grade=\""+data[i].stuId+"\" value=\""+data[i].stuId+"\"";  
		                      optionString += ">"+data[i].studentName+"</option>";  //动态添加数据  
					}
					 $("select[id=student]").empty();
					 $("select[id=student]").append(optionString);
				}else{
					$.message.alert("提示错误！")
				}
			});
	}
</script>